package com.example.producer.mq;

import com.example.producer.utils.DateTimeUtil;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * 反馈消费者
 */
@Component
public class FeedbackConsumer {

    @JmsListener(destination = "${feedbackqueue}")
    public void receive(String msg) {
        System.out.println("反馈收到:" + msg);
        try {
            Thread.sleep(1000 * 60);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("反馈处理结束时间：" + DateTimeUtil.getCurrentDateTime());
    }
}
